<!DOCTYPE html>
<html>

	<head>
		<meta charset="UTF-8">
		<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
		<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
		<link rel="stylesheet" href="layui/css/layui.css" media="all" />
		<link rel="stylesheet" href="layui/css/layui.mobile.css" />
		<script type="text/javascript" src="layui/lay/modules/form.js"></script>
		<script src="layui/layui.all.js"></script>
		<script src="layui/lay/modules/upload.js"></script>
		<script src="layui/lay/modules/table.js"></script>
		<title>上架物品信息</title>
	</head>

	<body class="layui-layout-body">
		<div class="layui-layout layui-layout-admin">
			<div class="layui-header">
				<div class="layui-logo layui-bg-orange">二手交易网</div>
				<ul class="layui-nav  layui-layout-left">
					<li class="layui-nav-item">
						<a href="">最新活动</a>
					</li>
					<li class="layui-nav-item">
						<a href="javascript:;">租赁</a>
						<dl class="layui-nav-child">
							<dd>
								<a href="">手机</a>
							</dd>
							<dd>
								<a href="">充电宝</a>
							</dd>
							<dd>
								<a href="">雨伞</a>
							</dd>
						</dl>
					</li>
					<li class="layui-nav-item layui-this">
						<a href="">上架</a>
					</li>
					<li class="layui-nav-item">
						<a href="javascript:;">逛逛</a>
						<dl class="layui-nav-child">
							<dd>
								<a href="">手机</a>
							</dd>
							<dd>
								<a href="">电脑</a>
							</dd>
							<dd class="layui-this">
								<a href="">游戏账号</a>
							</dd>
							<dd>
								<a href="">LOL</a>
							</dd>
							<dd>
								<a href="">DNF</a>
							</dd>
						</dl>
					</li>
					<li class="layui-nav-item">
						<a href="">购物车</a>
					</li>
					<li class="layui-nav-item">
						<a href="">社区</a>
					</li>
				</ul>

				<ul class="layui-nav  layui-layout-right">
					<li class="layui-nav-item">
						<a href="javascript:;"><img src="landing/img/6.png" class="layui-nav-img" />王飞</a>
						<span class="layui-nav-more"></span>
						<dl class="layui-nav-child">
							<dd>
								<a href="">个人信息</a>
							</dd>
							<dd>
								<a href="">密码修改</a>
							</dd>
							<dd>
								<a href="">上架物品</a>
							</dd>
						</dl>
					</li>
					<li class="layui-nav-item">
						<a href="javascript:;">注销</a>
					</li>
				</ul>
			</div>
		</div>

		<fieldset class="layui-elem-field layui-field-title" style="margin-top: 20px;">
			<legend>我的发布</legend>
		</fieldset>
		<form class="layui-form" action="">
			<div>
				<blockquote class="layui-elem-quote">我已上架的物品</blockquote>
			</div>
				<table id="demo" lay-filter="test"></table>
			</form>
		<script src="layui/lay/modules/element.js"></script>
		<script src="layui/lay/modules/table.js"></script>
		<script>
			layui.use('table', function() {
				var table = layui.table;

				//第一个实例
				table.render({
					elem: '#demo',
					height: 312,
					url: '/demo/table/user/' //数据接口
						,
					page: true //开启分页
						,
					cols: [
						[ //表头
							{
								field: 'id',
								title: 'ID',
								width: 80,
								sort: true,
								fixed: 'left'
							}, {
								field: 'username',
								title: '物品信息',
								width: 177
							}, {
								field: 'money',
								title: '价格',
								width: 100
							}, {
								field: 'date',
								title: '上架时间',
								width: 177
							}, {
								field: 'nd',
								title: '新旧程度',
								width: 177
							}, {
								field: 'img',
								title: '照片',
								width: 80
							}, {
								field: 'intime',
								title: '访问次数',
								width: 177
							}, {
								field: 'tf',
								title: '是否卖出',
								width: 177,
								sort: true
							}
						]
					]
				});

			});

			layui.use('element', function() {
				var element = layui.element; //导航的hover效果、二级菜单等功能，需要依赖element模块

				//监听导航点击
				element.on('nav(demo)', function(elem) {
					//console.log(elem)
					layer.msg(elem.text());
				});
			});
		</script>

</html>
<script type="text/javascript" src="layui/lay/modules/form.js"></script>